// 全局样式变量
$primary-color: #409EFF;
$success-color: #67C23A;
$warning-color: #E6A23C;
$danger-color: #F56C6C;
$info-color: #909399;

// 全局样式重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

// 工具类
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.ml-10 {
  margin-left: 10px;
}

.mr-10 {
  margin-right: 10px;
}

// 页面容器样式
.page-container {
  background: white;
  border-radius: 4px;
  padding: 20px;
  min-height: calc(100vh - 100px);
}

.page-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ebeef5;

  h2 {
    font-size: 20px;
    font-weight: 500;
    color: #303133;
  }

  .page-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

// YAML 编辑器样式
.yaml-editor {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
  font-size: 14px;
  line-height: 1.6;

  .el-textarea__inner {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
  }
}

// 状态标签样式
.status-tag {
  &.status-running {
    color: $primary-color;
  }

  &.status-success {
    color: $success-color;
  }

  &.status-failed {
    color: $danger-color;
  }

  &.status-pending {
    color: $warning-color;
  }

  &.status-paused {
    color: $info-color;
  }
}

// 操作按钮组样式
.action-buttons {
  .el-button + .el-button {
    margin-left: 10px;
  }
}

// 表格样式优化
.el-table {
  .cell {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

// 对话框样式
.el-dialog {
  .dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
}

// 分页样式
.el-pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;

  &:hover {
    background: #a8a8a8;
  }
}
